package com.xuecheng.order.service;

import com.xuecheng.commons.model.vo.OrdersVo;
import com.xuecheng.commons.model.vo.ResponseResult;
import com.xuecheng.order.domain.Orders;
import com.baomidou.mybatisplus.extension.service.IService;

import java.io.IOException;

/**
 * <p>
 * 订单 服务类
 * </p>
 *
 * @author itheima
 * @since 2022-12-13
 */
public interface OrdersService extends IService<Orders> {

    //用户下单
    ResponseResult<String> createOrder(Long coursePubId) throws IOException;

    //根据订单编号查询支付是否成功
    ResponseResult<OrdersVo> isPay(String orderNo) throws IOException;

    //清理超时订单
    void clearOrder() throws IOException;
}
